import {get, post, save, deletep, put, upload} from './http'

/**
 * 通过流程定义id获取节点
 * @param {} p
 */
export const startQueryOutGoing_Url = p => post('quality/bpm/startQueryOutGoing', p);

/**
 * 通过流程定义id和路由id获取节点审批人
 * @param {} p
 */
export const startQueryOutUsers_Url = p => post('quality/bpm/startQueryOutUsers', p);

/**
 * 发起流程
 * @param {} p
 */
export const startProcess_Url = p => post('quality/bpm/startProcess', p);

/**
 * 通过任务id和路由id获取节点审批人
 * @param {} p
 */
export const queryOutUsers_Url = p => post('quality/bpm/queryOutUsers', p);

/**
 * 通过任务id获取下一步审批节点
 * @param {} p
 */
export const queryOutGoing_Url = p => post('quality/bpm/queryOutGoing', p);

/**
 * 工作流审批（不带参数变量）
 * @param {} p
 */
export const completeTask_Url = p => post('quality/bpm/completeTask', p);

/**
 * 根据业务主键查询工作流记录
 *
 * @param p
 * @returns {*|Promise|Promise<unknown>}
 */
export const findByBusinessKey = p => post('/quality/bpmNodeStatus/findByBusinessKey', p);

/**
 * 插入/更新流程记录
 *
 * @param p
 * @returns {*|Promise|Promise<unknown>}
 */
export const changeBpmNodeStatus = p => put('/quality/bpmNodeStatus/changeBpmNodeStatus', p);

/**
 * 根据主键ID查询
 *
 * @param p
 * @returns {*|Promise|Promise<unknown>}
 */
export const findById = p => post('/quality/bpmNodeStatus/findById', p);

/**
 * 草稿传入状态为1 并返回对应的主键ID
 *
 * @param p
 * @returns {*|Promise|Promise<unknown>}
 */
export const draftId = p => post('/quality/bpmNodeStatus/draftId', p);

/**
 * 修改流程状态
 *
 * @param p
 * @returns {*|Promise|Promise<any>|Window.Promise}
 */
export const addUploadInfo = p => post('/quality/bpm/uploadInfo/addUploadInfo', p);